CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_capacity_reconciliation(
id                                                 bigint                         COMMENT '主键ID',
task_no                                            String                         COMMENT '任务单号',
operate_date                                       String                         COMMENT '操作日',
carrier_name                                       String                         COMMENT '承运商名称',
carrier_id                                         bigint                         COMMENT '承运商ID',
lines_name                                         String                         COMMENT '线路名称',
shipment_name                                      String                         COMMENT '任务名称',
quoting_model                                      String                         COMMENT '报价模式',
motorcycle_type                                    String                         COMMENT '车型',
car_numbers                                        String                         COMMENT '车牌号',
planned_departure_time                             timestamp                      COMMENT '计划发车时间',
actual_departure_time                              timestamp                      COMMENT '实际发车时间',
actual_arrival_time                                timestamp                      COMMENT '实际到车时间',
handle_freight                                     Double                         COMMENT '单程含税运价',
reconciliation_amount                              Double                         COMMENT '调账金额',
bill_month                                         String                         COMMENT '账单月份',
operation_model                                    smallint                       COMMENT '运行模式 1单边 2对开 3往返'
)
COMMENT '承运商调账表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_capacity_reconciliation'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);
